<div id="content">
	<?php
		if(isset($_GET['profile']))
			include('php/profile.php');
		elseif(isset($_GET['friends']))
			include('php/friends.php');
		elseif(isset($_GET['settings']))
			include('php/settings.php');
		elseif(isset($_GET['message']))
			include('php/message.php');
		elseif(isset($_GET['picture']))
			include('php/picture.php');
		else
		{
			?>
				<script>
					$(document).ready(function()
					{
						var wall = "<?php echo $_SESSION['userid'];?>";
						var privat = 0;
						var checkbox = document.getElementById("status_checkbox");	
						$(".status_send").click(function()
						{
							if(checkbox.checked == true)
								privat = 1;
							else
								privat = 0;
							var textElement = document.getElementById("status_text");
							var msg = textElement.value;
							$.ajax({
							type: "POST",
							url: "./php/status_msg.php",
							data :{msg: msg, privat: privat, wall:wall}
							}).done(function( html ){
							$("#news").prepend(html);
							textElement.value = '';
							});
						});	
					});
				</script>
				<div id="news_head">
					<span>News Stream</span>
				</div>
				<div id="status">
					<textarea maxlength="1000" name="msg" id="status_text" placeholder="Status Nachricht - Maximal 1000 Zeichen"></textarea>
					<button type="submit" value="Absenden" class="status_send">Absenden</button>
					<div class="status_privat">
						<span>Nur Freunde: </span>
						<input type="checkbox" id="status_checkbox" checked/>
					</div>
				</div>
				<div id="news">
					<?php
						getNews($_SESSION['userid'], $_SESSION['username'], 0);
					?>
				</div>				
			<?php
		}
	?>
</div>